#!/bin/bash

# This script is used to create a special HSC user

if [ "$1" = "" -o "$2" = "" ]; then
   echo  "ERROR: This script requires two input arguments..."
   exit 2
fi


JAVAPATH="/opt/IBMJava2-131/jre/bin/"
x=`type -p java 2>/dev/null`
if [ "$x" != "" ]
then
  JAVAPATH=`/usr/bin/dirname $x`
fi
export PATH=$JAVAPATH:$PATH

if [ "${DEBUG_JARS_DIRECTORY}" != "" ] ; then
  if [ -d ${DEBUG_JARS_DIRECTORY} ] ; then
    for i in ${DEBUG_JARS_DIRECTORY}/*.jar
    do
       debug_jars=${debug_jars}:$i
    done
  fi
fi

export CLASSPATH=${DEBUG_JARS_DIRECTORY}:${debug_jars}:/usr/websm/codebase/pluginjars/hsc.jar:/usr/websm/codebase/wsm.jar:$CLASSPATH

echo "Creating an User...."

java -Xms20m -Xmx128m com.ibm.hsc.common.util.CreateHSCUser $1 $2

